package com.shop.controller;


import com.shop.entity.BulkMerchantReturn;
import com.shop.model.PageParam;
import com.shop.model.vo.Rsp;
import com.shop.service.BulkMerchantReturnService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Validated
@RestController
@RequestMapping("merchantReturn")
@AllArgsConstructor
public class BulkMerchantReturnController {
    /**
     * 服务对象
     */
    private final BulkMerchantReturnService bulkMerchantReturnService;
    /**
     * @author clh
     * @description 分页
     * @date  2020/11/30 19:39
     * @param pageParam
     * @return {@link Rsp}
     **/
    @PostMapping("searchSomeByPageMerchantReturn")
    public Rsp searchSomeByPageMerchantReturn(@RequestBody PageParam<BulkMerchantReturn> pageParam){

        return Rsp.success(bulkMerchantReturnService.searchSomeByPageReturn(pageParam));
    }
    /**
     * @author clh
     * @description  修改状态
     * @date  2020/11/30 19:39
     * @param bulkMerchantReturn
     * @return {@link Rsp}
     **/
    @PostMapping("updateStatusOne")
    public Rsp updateStatusOne(@RequestBody BulkMerchantReturn bulkMerchantReturn){
        System.out.println(bulkMerchantReturn);
        return bulkMerchantReturnService.updateStatusOne(bulkMerchantReturn);
    }
}
